package chess

import "gddgame.cc/galaxy/common/feature/orbit/chess_protocol"

//go:generate msgp

const (
	DefaultLevel = 1
)

type NoticeEvent byte

const (
	OnMessage NoticeEvent = iota
	OnMoveData
	OnUpdateData
	OnDestroyData
	OnCreateData
	OnBatchData
	OnSingleNode
)

//
////msgp:tuple Node
//type Node struct {
//	Position     []byte        `json:"position" msg:"position"`
//	Props        []interface{} `json:"props" msg:"props"`
//	Sorted       []interface{} `json:"sorted" msg:"sorted"`
//	List         []interface{} `json:"list" msg:"list"`
//	Dependents   []int         `json:"dependents" msg:"dependents"`
//	BeDependents [][]int       `json:"be_dependents" msg:"be_dependents"`
//}

//msgp NodeSlice
type NodeSlice []*chess_protocol.Data

////msgp:tuple Data
//type Data struct {
//	DataType     byte                    `json:"dataType" msg:"dataType"`
//	Id           int                     `json:"id" msg:"id"`
//	Position     []byte                  `json:"position" msg:"position"`
//	Props        []interface{}           `json:"props" msg:"props"`
//	Sorted       []interface{}           `json:"sorted" msg:"sorted"`
//	List         []interface{}           `json:"list" msg:"list"`
//	Dependents   []int                   `json:"dependents" msg:"dependents"`
//	BeDependents [][]int                 `json:"be_dependents" msg:"be_dependents"`
//	Message      *chess_protocol.Message `json:"message" msg:"message"`
//}

//msgp DataSlice
type DataSlice []*chess_protocol.SingleData

//
////msgp:tuple UpdateDataContent
//type UpdateDataContent struct {
//	DataType    byte                               `json:"dataType" msg:"dataType"`
//	Id          int                                `json:"id" msg:"id"`
//	Props       []chess_protocol.UpdateProp        `json:"props" msg:"props"`
//	Sorted      *chess_protocol.UpdateSorted       `json:"sorted" msg:"sorted"`
//	List        []chess_protocol.UpdateList        `json:"list" msg:"list"`
//	BeDependent []chess_protocol.UpdateBeDependent `json:"be_dependents" msg:"be_dependents"`
//	Message     *chess_protocol.Message            `json:"message" msg:"message"`
//}
//
////msgp:tuple MoveDataContent
//type MoveDataContent struct {
//	DataType    byte                               `json:"dataType" msg:"dataType"`
//	Id          int                                `json:"id" msg:"id"`
//	Current     []byte                             `json:"current" msg:"current"`
//	Props       []chess_protocol.UpdateProp        `json:"props" msg:"props"`
//	Sorted      *chess_protocol.UpdateSorted       `json:"sorted" msg:"sorted"`
//	List        []chess_protocol.UpdateList        `json:"list" msg:"list"`
//	BeDependent []chess_protocol.UpdateBeDependent `json:"be_dependents" msg:"be_dependents"`
//	Message     *chess_protocol.Message            `json:"message" msg:"message"`
//}
//
////msgp:tuple DestroyDataContent
//type DestroyDataContent struct {
//	DataType byte `json:"dataType" msg:"dataType"`
//	Id       int  `json:"id" msg:"id"`
//}
//
////msgp:tuple UpdateNodeContent
//type UpdateNodeContent struct {
//	Position    []byte                             `json:"position" msg:"position"`
//	Props       []chess_protocol.UpdateProp        `json:"props" msg:"props"`
//	Sorted      *chess_protocol.UpdateSorted       `json:"sorted" msg:"sorted"`
//	List        []chess_protocol.UpdateList        `json:"list" msg:"list"`
//	Dependents  []chess_protocol.UpdateDependent   `json:"dependents" msg:"dependents"`
//	BeDependent []chess_protocol.UpdateBeDependent `json:"be_dependents" msg:"be_dependents"`
//}
